/*
 * 太原科技大学。
 * Copyright 2021, YCHS Information&Science Technology Co.,Ltd,
 * All rights reserved.
 */
package com.example.demo.mapper;

import com.example.demo.pojo.Plan;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liuchao
 * @version 1.0
 * @date 2024/5/5
 */

@Mapper
public interface PlanMapper {

    @Select("select planid,p_name from plan where p_user=#{id}")
    List<Plan> selectUseId(int id);

    @Delete("delete from plan where planid=#{id}")
    void deleteId(Integer id);

    //直接将新加的计划返回渲染，前端就没必要查询全部避免记录过多性能下降
    Long selectthis(Plan plan);
}
